package com.sso.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.sso.utils.CookieUtils;

@Controller
public class LogoutController extends BaseController {

	/**
	 * 对外提供退出接口
	 */
	@ResponseBody
	@RequestMapping("/logmy")
	public String logmy() {
		/**
		 * 非 SSO 所在域系统，提供退出方法给 SSO 统一退出
		 */
		///SSOHelper.clearLogin(request, response);
		CookieUtils.deleteCookie(request, response, "SSO-TOKEN");
		return "success";
	}
}
